import React, { FC } from 'react'
import { useNavigate } from 'react-router-dom'
import {LeftOutlined } from '@ant-design/icons';
import './myhead.scss'
const Myhead:FC<any>=({title,back})=> {
  const navigate = useNavigate()
  // back="true" 有返回上一级
  return (
    <div className='myhead'>
        {
          back&&<div style={{position:"absolute",left:"10px"}} onClick={()=>navigate(-1)}>
          <LeftOutlined />
          </div>
        }
        {title}
    </div>
  )
}
export default Myhead
